home *** CD-ROM | disk | FTP | other *** search
/ 1st Multimedia Mac Shareware / Multimedia Shareware CD-ROM - BetaCorp.iso / StackToolsƒ / Utilities / AutoCat / AutoCat / stack_-1.xml < prev   
Encoding:
Extensible Markup Language  |  1992-08-12  |  6.3 KB  |  38 lines

  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <!DOCTYPE stack PUBLIC "-//Apple, Inc.//DTD stack V 2.0//EN" "" >
  3. <stack>
  4.     <name>in</name>
  5.     <id>-1</id>
  6.     <cardCount>15</cardCount>
  7.     <cardID>6151</cardID>
  8.     <listID>7244</listID>
  9.     <cantModify><false /></cantModify>
  10.     <cantDelete><false /></cantDelete>
  11.     <cantAbort><false /></cantAbort>
  12.     <cardSize>
  13.         <width>512</width>
  14.         <height>342</height>
  15.     </cardSize>
  16.     <script>-- init stack
  17. on openStack
  18. initAll
  19. end openStack
  20.  
  21. on resume
  22. initAll
  23. pass resume
  24. end resume
  25.  
  26. on startUp
  27. initAll
  28. pass startUp
  29. end startUp
  30.  
  31. on initAll
  32. push recent card
  33.  
  34. -- flag whether New Card commands are from user or from XCMD
  35. global fromXCMD, volumeXCMD,hardDisk,applPath
  36.  
  37. -- init Find string and buttons
  38. global sourceString
  39. put empty into sourceString
  40. global selectedText, whichButton,whichFindButton
  41.  
  42. -- the ShowPath XFCN will return an Application's pathname
  43. --in this global if the "Record" button is clicked
  44. put empty into applPath
  45.  
  46. put false into fromXCMD -- New Card command is from user
  47. put false into hardDisk -- Floppies being cataloged
  48.  
  49.  
  50. -- field remembers Find dialog box settings between stack uses
  51. get line 2 of card field "Hold Globals" of card¬¨
  52. "AutoCat Index"
  53. if it is not empty then
  54. put line 1 of card field "Hold Globals" of card¬¨
  55. "AutoCat Index" into selectedText
  56. put line 2 of card field "Hold Globals" of card¬¨
  57. "AutoCat Index" into whichButton
  58. put line 3 of card field "Hold Globals" of card¬¨
  59. "AutoCat Index" into whichFindButton
  60. else
  61. -- if it doesn't remember, set defaults
  62. put empty into selectedText
  63. put 1 into whichButton
  64. put 1 into whichFindButton
  65. end if
  66. end initAll
  67.  
  68.  
  69.  
  70. on closeStack
  71. -- record find dialog box's most recent settings
  72. global selectedText, whichButton,whichFindButton
  73. put selectedText into line 1 of card field "Hold Globals" of card¬¨
  74. "AutoCat Index"
  75. put whichButton into line 2 of card field "Hold Globals" of card¬¨
  76. "AutoCat Index"
  77. put whichFindButton into line 3 of card field "Hold Globals" of card¬¨
  78. "AutoCat Index"
  79.  
  80. -- Auto Compact stack if necessary
  81. if the freeSize of this stack >= 15000 then
  82. answer "The AutoCat Stack has " & round(the freeSize of this¬¨
  83. stack/1024) & "k free, Compact?" with  "NO" or "OK"
  84. if it is "OK" then doMenu "compact stack"
  85. end if
  86. end closeStack
  87.  
  88. --find field line clicked on in a scrlloing field
  89. Function lineClicked
  90. return (trunc(((scroll of the target) ¬¨
  91. + (item two of the clickloc) ¬¨
  92. - (item two of the rect of the target)) ¬¨
  93. div the textheight of the target) + one)
  94. end lineClicked
  95.  
  96.  
  97. on returnKey
  98. global sourceString -- last find string
  99. if sourceString is not empty then -- continue search
  100. set cursor to 4
  101. searchAC 0
  102. else
  103. pass returnKey
  104. end if
  105. end returnKey
  106.  
  107. on searchAC flag
  108. -- which field to search, what mode to use, e.g., chars, word...
  109. -- these globals are maintained by the SearchAutoCat XFCN
  110. global whichButton,whichFindButton
  111. -- the source
  112. global sourceString
  113.  
  114. -- a simple XFCN which puts up a dialog box looking for the search
  115. -- string and the options
  116.  
  117. if flag >0 then
  118. put SearchAutoCat () into sourceString
  119. end if
  120.  
  121. if sourceString is empty then exit searchAC
  122.  
  123. -- the XFCN returns 1,2, or 3 for which find mode button was set
  124.  
  125. if whichButton contains 1 then -- search all fields
  126. if whichFindButton contains 1 then -- look at beginnings of words
  127. find sourceString
  128. end if -- wfb 1
  129. if whichFindButton contains 2 then -- look at words only
  130. find word sourceString
  131. end if -- wfb 2
  132. if whichFindButton contains 3 then -- look at chars
  133. find chars sourceString
  134. end if -- wfb 3
  135. end if  -- whichButton
  136.  
  137. -- XFCN returns 1-8 depending on which field button was set
  138.  
  139. if whichButton contains 2 then
  140. SearchFields 9, 3424
  141. end if
  142. if whichButton contains 3 then
  143. SearchFields 1, 3424
  144. end if
  145. if whichButton contains 4 then
  146. SearchFields 1, 2241
  147. end if
  148. if whichButton contains 5 then
  149. SearchFields 2, 2241
  150. end if
  151. if whichButton contains 6 then
  152. SearchFields 61, 2241
  153. end if
  154. if whichButton contains 7 then
  155. SearchFields 62, 2241
  156. end if
  157. if whichButton contains 8 then
  158. SearchFields 50, 2241
  159. end if
  160. end searchAC
  161.  
  162.  
  163. on SearchFields fieldID,bkgndID
  164. global whichButton,whichFindButton,sourceString
  165.  
  166. -- go to the proper bkgnd to begin search
  167. if the ID of this bkgnd is not bkgndID then
  168. go to bkgnd ID bkgndID
  169. end if
  170. if whichFindButton contains 1 then -- look at beginnings of words
  171. find sourceString in bkgnd field ID fieldID
  172. end if -- wfb 1
  173. if whichFindButton contains 2 then -- look at words only
  174. find word sourceString in bkgnd field ID fieldID
  175. end if -- wfb 2
  176. if whichFindButton contains 3 then -- look at chars
  177. find chars sourceString in bkgnd field ID fieldID
  178. end if -- wfb 3
  179. send mouseWithin to bkgnd field ID fieldID
  180. end SearchFields
  181.  
  182. on doMenu which
  183. -- trap command-F to bring up Find dialog box
  184. if which is "Find..." then
  185. searchAC 1
  186. else
  187. pass doMenu
  188. end if
  189. end doMenu
  190.  
  191. </script>
  192.     <background id="2241" file="background_2241.xml" name="" />
  193.     <background id="2726" file="background_2726.xml" name="Index Card Bkgnd" />
  194.     <background id="3424" file="background_3424.xml" name="" />
  195.     <background id="4606" file="background_4606.xml" name="AutoCat Help Bkgnd" />
  196.     <background id="6410" file="background_6410.xml" name="Application Bkgnd" />
  197.     <card id="6151" file="card_6151.xml" marked="false" name="AutoCat Index" owner="2726" />
  198.     <card id="7767" file="card_7767.xml" marked="false" name="AutoCat Help" owner="4606" />
  199.     <card id="7615" file="card_7615.xml" marked="false" name="AutoCat Help" owner="4606" />
  200.     <card id="3773" file="card_3773.xml" marked="false" name="Search Card" owner="4606" />
  201.     <card id="5441" file="card_5441.xml" marked="false" name="PathWay/Launch" owner="4606" />
  202.     <card id="8578" file="card_8578.xml" marked="false" name="Hard Disk/Record" owner="4606" />
  203.     <card id="6055" file="card_6055.xml" marked="false" name="Printing" owner="4606" />
  204.     <card id="8746" file="card_8746.xml" marked="false" name="XCMDs & XFCNs" owner="4606" />
  205.     <card id="9913" file="card_9913.xml" marked="false" name="Hints & Tips" owner="4606" />
  206.     <card id="9640" file="card_9640.xml" marked="false" name="ShareWare Fee" owner="4606" />
  207.     <card id="6934" file="card_6934.xml" marked="false" name="Applications" owner="6410" />
  208.     <card id="5366" file="card_5366.xml" marked="false" name="Disk Box Index" owner="3424" />
  209.     <card id="4971" file="card_4971.xml" marked="false" name="Box #1.Index" owner="3424" />
  210.     <card id="3043" file="card_3043.xml" marked="false" name=" Disk Cat Template" owner="2241" />
  211.     <card id="5654" file="card_5654.xml" marked="false" name="Box #1 1" owner="2241" />
  212. </stack>
  213.